#ifndef _SPECTRALCONTRAST_FEAT
#define _SPECTRALCONTRAST_FEAT

#include "wave.h"
#include "rsrfft.h"
#include <cmath>

#define PI							3.1415926

//#define SAMPLERATE					16000
#define DIMENSION_OF_RSC			12//24
#define ZERO_PADDING_RATE			0.9f
#define NEIGHBORHOOD_ALPHA			0.2f//0.02f
#define SUBBAND_NUM					DIMENSION_OF_RSC/2
#define FEAT_DIM					12		//  [11/26/2010 Song]

class SpectralContrastFeat
{
public:
	SpectralContrastFeat(int lengthArg, int nSampRate);
	SpectralContrastFeat(int nWinsize, int framePeriod, int nSampRate);
	~SpectralContrastFeat();
	int		RawSpectralContrast(short *buffer);
	int		SpectralContrast(short *waveData, int NumSamples, int &nFramNum);
	void	DoNorm(float *data, int n, int vSize);

	float	*rawSpectralContrast; // the result is in [SC(1) Valley(1) SC(2) Valley(2) ...] order
	float	*pf_FeatBuf;			// the result is in [SC(1) SC(2) ... Valley(1)  Valley(2) ...] order

protected:

	SplitRadixFFT *fft;
	int		length;
	float	*hammingWin;
	int		FFT_Point;
	short	FFT_Order;
	int		*boundaryTable;
	int		*subbandSize;

	int		m_nWinSize;
	int		m_nFrameSize;
	int		m_nSampRate;

};



#endif